/**************************************************************
 *@ProjectName: blweibo
 *@FileName: Count.java
 *@Date: 2011-5-30
 *@Copyright: 2011 www.hrbanlv.com Inc. All rights reserved.
 **************************************************************/
package com.zhiweibo.models;

import org.json.JSONObject;

/**
 * The Class Count.
 * 
 * @author SunHaibin
 * @since Android 1.6
 * @history 2011-5-30
 */
public class Count {

    /** The comments. */
    private int comments;

    /** The replys. */
    private int replys;

    /** The tid. */
    private String tid;

    /**
     * Gets the tid.
     * 
     * @return the tid
     */
    public String getTid() {
        return tid;
    }

    /**
     * Sets the tid.
     * 
     * @param tid
     *            the new tid
     */
    public void setTid(String tid) {
        this.tid = tid;
    }

    /**
     * Gets the comments.
     * 
     * @return the comments
     */
    public int getComments() {
        return comments;
    }

    /**
     * Sets the comments.
     * 
     * @param comments
     *            the new comments
     */
    public void setComments(int comments) {
        this.comments = comments;
    }

    /**
     * Gets the replys.
     * 
     * @return the replys
     */
    public int getReplys() {
        return replys;
    }

    /**
     * Sets the replys.
     * 
     * @param replys
     *            the new replys
     */
    public void setReplys(int replys) {
        this.replys = replys;
    }

    /**
     * Instantiates a new count.
     */
    public Count() {
        comments = 0;
        replys = 0;
        tid = "";
    }

    /**
     * Instantiates a new count.
     * 
     * @param js
     *            the js
     */
    public Count(JSONObject js) {
        if (js != null) {
            comments = js.optInt("comments", 0);
            replys = js.optInt("replys", 0);
            tid = js.optString("tid", "");
        }
    }
}
